@extends('layouts.auth')

@section('title', '修改密码')

@section('content')
<div class="P-UserCenter mt-2">
    <div class="container">
        <div class="row d-none d-md-block bg-white mb-2">
        @include('auth.partials.subnav')
        </div>

        <div class="row bg-white">
            <div class="border-bottom mt-4"><h4 class="fs-5 py-2">{{ $title }}</h4></div>
            @if(session('status'))
            <div class="alert alert-success">{{ session('status') }}</div>
            @endif
            <form action="{{ route('auth.password.update', ['accountType' => $accountType]) }}" class="ChangeForm mx-auto py-5" method="post" style="max-width: 25rem;">
                @csrf
                <div class="form-group">
                    <label for="current_password" class="text-right col-form-label">旧密码：</label>
                    <input type="password" class="form-control" name="current_password" id="current_password" placeholder="请输入密码" required>
                    @error('current_password')
                    <div class="text-danger">{{ $message }}</div>
                    @enderror
                </div>
                <div class="form-group">
                    <label for="new_password" class="text-right col-form-label">新密码：</label>
                    <input type="password" class="form-control" name="new_password" id="new_password" placeholder="请输入新密码" required>
                    @error('new_password')
                    <div class="text-danger">{{ $message }}</div>
                    @enderror
                </div>
                <div class="form-group">
                    <label for="new_password_confirmation" class="text-right col-form-label">确定新密码：</label>
                    <input type="password" class="form-control" name="new_password_confirmation" id="new_password_confirmation" placeholder="再次输入密码" required>
                    @error('new_password_confirmation')
                    <div class="text-danger">{{ $message }}</div>
                    @enderror
                </div>
                <div class="form-group mt-4 d-grid gap-2 col-6 mx-auto">
                    <button type="submit" class="btn btn-primary">修改密码</button>
                </div>
            </form>
        </div>
    </div>
</div>
@endsection
